package cn.com.cetccst.usercenter.ui;

import cn.com.cetccst.uicomponents.binding.app.DataBindingActivity;
import cn.com.cetccst.uicomponents.binding.app.DataBindingConfig;
import cn.com.cetccst.usercenter.BR;
import cn.com.cetccst.usercenter.R;
import cn.com.cetccst.usercenter.model.UserInfoModel;
import cn.com.cetccst.usercenter.UserInfoViewModel;
import cn.com.cetccst.usercenter.databinding.ActivityUserInfoBinding;

public class UserInfoActivity extends DataBindingActivity<ActivityUserInfoBinding> {

    UserInfoViewModel viewModel;

    @Override
    protected void initViewModel() {
        UserInfoModel userInfo = new UserInfoModel();
        userInfo.setUserName("阿斯蒂芬");
        userInfo.setDepartment("请问而非产品线");
        userInfo.setUserPhoneNumber("15000000000");
        userInfo.setSecLevel("非密");
        userInfo.setUsageType("个人使用");
        userInfo.setAssetNumber("25486434834.4");
        userInfo.setDeviceName("干让他的设备");
        userInfo.setProtectionStatus("防护中");
        viewModel = getActivityScopeViewModel(UserInfoViewModel.class);
        viewModel.userInfo.setValue(userInfo);
    }

    @Override
    protected DataBindingConfig getDataBindingConfig() {
        return new DataBindingConfig(R.layout.activity_user_info, BR.viewModel, viewModel);
    }
}
